﻿using System;
using System.Collections.Generic;
using System.Text;
using WPFCABShell.Shell.Interface.Services.Command;

namespace WPFCABShell.Shell.Interface.Services.Menu
{
	/// <summary>
	/// Provides service related to the application menus.
	/// </summary>
	/// <remarks>
	/// <para>
	/// The menu service is used in conjunction with the command service. Once a command is obtained via the command service, the
	/// menu service can be used to add that command to an application menu extensibility point. This might be the main menu, or
	/// perhaps a context menu.
	/// </para>
	/// <para>
	/// Menu items can be grouped and sorted. Menu items with the same group index will appear together with separators on either
	/// side. The index is used within a group to sort menu items.
	/// </para>
	/// </remarks>
	public interface IMenuService
	{
		/// <summary>
		/// Adds a menu item to a specified target site.
		/// </summary>
		/// <param name="targetSiteName">
		/// The CAB site name to which the menu item will be added.
		/// </param>
		/// <param name="command">
		/// The command to associate with the menu item.
		/// </param>
		/// <param name="groupIndex">
		/// A group index, which allows related menu items to be grouped and automatically separated.
		/// </param>
		/// <param name="index">
		/// An index, which allows menu items in the same group to be ordered.
		/// </param>
		/// <param name="siteName">
		/// The name of a new site that will be registered for the new menu item.
		/// </param>
		/// <returns>
		/// The menu item.
		/// </returns>
		IMenuItem Add(string targetSiteName, ICommand command, int? groupIndex, int? index, string siteName);

		/// <summary>
		/// Removes a menu item.
		/// </summary>
		/// <param name="menuItem">
		/// The menu item to remove.
		/// </param>
		void Remove(IMenuItem menuItem);
	}
}
